package com.example.pei.papa;

import android.app.Application;
import android.content.Context;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
import com.tencent.bugly.crashreport.CrashReport;

import static cn.bmob.v3.Bmob.getApplicationContext;

/**
 * Created by Pei on 2017/11/8.
 */

public class AppApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        initImageLoader();

        Context appContext =  this.getApplicationContext();

        String appId = "86675579a7";   //上Bugly(bugly.qq.com)注册产品获取的AppId

        boolean isDebug = true ;  //true代表App处于调试阶段，false代表App发布阶段

        CrashReport. initCrashReport(appContext , appId ,isDebug);  //初始化SDK

     //   CrashReport.testJavaCrash();
    }

    private void initImageLoader() {
        ImageLoaderConfiguration configuration = ImageLoaderConfiguration.createDefault(this);
        ImageLoader.getInstance().init(configuration);



    }
}
